<template>
	<view style="contant">
		<image mode="aspectFit" style="  width: 100%;
  height: 100%;
  object-fit: cover; 
  position: absolute;
  top: 0;
  left: 0;" :src="src" @click="clickImg"></image>
	</view>
</template>

<script>
	import config from '@/config'
	import {
		getFile
	} from '@/api/system/file.js';
	export default {
		data() {
			return {
				src:""
			};
		},
		onLoad() {
			this.getimg();
		},
		methods:{
			getimg(){
				getFile("1").then(e=>{
					this.src=config.baseUrl+e.data.fileUrl
					console.log(this.src)
				})
			},
			clickImg(){
				uni.previewImage({
					urls:[this.src]
				})
			}
		}
	}
</script>

<style lang="scss">
.contant{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
</style>
